package pantallas;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class ReservaView extends javax.swing.JFrame {
	private JButton cmdCrear;
	private JTextField txtNombre;
	private JLabel lblSeparado2;
	private JComboBox cmdMes;
	private JComboBox cmbAntePost;
	private JComboBox cmbHora;
	private JLabel lblHora;
	private JComboBox cmbAnio;
	private JLabel lblSeparador;
	private JComboBox cmbDia;
	private JTextField txtTelefono;
	private JTextField txtNroCubiertos;
	private JLabel lblFechaYHora;
	private JLabel lblTelefono;
	private JLabel lblCubiertos;
	private JLabel lblNombre;
	private JButton cmdCancel;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				ReservaView inst = new ReservaView();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public ReservaView() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				cmdCrear = new JButton();
				getContentPane().add(cmdCrear);
				cmdCrear.setText("Crear");
				cmdCrear.setBounds(85, 306, 93, 21);
				cmdCrear.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						System.out.println("cmdCrear.actionPerformed, event="+evt);
						JOptionPane.showMessageDialog(null, "Todos los campos son obligatorios");
					}
				});
			}
			{
				cmdCancel = new JButton();
				getContentPane().add(cmdCancel);
				cmdCancel.setText("Cancelar");
				cmdCancel.setBounds(301, 306, 88, 21);
			}
			{
				lblNombre = new JLabel();
				getContentPane().add(lblNombre);
				lblNombre.setText("Nombre");
				lblNombre.setBounds(71, 77, 145, 14);
			}
			{
				lblCubiertos = new JLabel();
				getContentPane().add(lblCubiertos);
				lblCubiertos.setText("Cantidad de Cubiertos");
				lblCubiertos.setBounds(71, 115, 152, 14);
			}
			{
				lblTelefono = new JLabel();
				getContentPane().add(lblTelefono);
				lblTelefono.setText("Telefono");
				lblTelefono.setBounds(71, 158, 145, 14);
			}
			{
				lblFechaYHora = new JLabel();
				getContentPane().add(lblFechaYHora);
				lblFechaYHora.setText("Fecha");
				lblFechaYHora.setBounds(71, 204, 115, 14);
			}
			{
				txtNombre = new JTextField();
				getContentPane().add(txtNombre);
				txtNombre.setBounds(218, 74, 195, 21);
			}
			{
				txtNroCubiertos = new JTextField();
				getContentPane().add(txtNroCubiertos);
				txtNroCubiertos.setBounds(218, 112, 195, 21);
			}
			{
				txtTelefono = new JTextField();
				getContentPane().add(txtTelefono);
				txtTelefono.setBounds(216, 156, 197, 18);
			}
			{
				ComboBoxModel cmbDiaModel = 
						new DefaultComboBoxModel(
								new String[] {"1", "2", "3", "4" ,"5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"});
				cmbDia = new JComboBox();
				getContentPane().add(cmbDia);
				cmbDia.setModel(cmbDiaModel);
				cmbDia.setBounds(210, 201, 49, 21);
			}
			{
				lblSeparador = new JLabel();
				getContentPane().add(lblSeparador);
				lblSeparador.setText("/");
				lblSeparador.setBounds(265, 204, 26, 14);
			}
			{
				ComboBoxModel cmdMesModel = 
						new DefaultComboBoxModel(
								new String[] {"Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"});
				cmdMes = new JComboBox();
				getContentPane().add(cmdMes);
				cmdMes.setModel(cmdMesModel);
				cmdMes.setBounds(276, 201, 73, 21);
			}
			{
				lblSeparado2 = new JLabel();
				getContentPane().add(lblSeparado2);
				lblSeparado2.setText("/");
				lblSeparado2.setBounds(353, 204, 10, 14);
			}
			{
				ComboBoxModel cmbAnioModel = 
						new DefaultComboBoxModel(
								new String[] {"2014", "2015", "2016", "2017", "2018", "2019", "2020"});
				cmbAnio = new JComboBox();
				getContentPane().add(cmbAnio);
				cmbAnio.setModel(cmbAnioModel);
				cmbAnio.setBounds(363, 201, 57, 21);
			}
			{
				lblHora = new JLabel();
				getContentPane().add(lblHora);
				lblHora.setText("Hora");
				lblHora.setBounds(71, 243, 139, 14);
			}
			{
				ComboBoxModel cmbHoraModel = 
						new DefaultComboBoxModel(
								new String[] {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10","11","12"});
				cmbHora = new JComboBox();
				getContentPane().add(cmbHora);
				cmbHora.setModel(cmbHoraModel);
				cmbHora.setBounds(210, 240, 49, 21);
			}
			{
				ComboBoxModel cmbAntePostModel = 
						new DefaultComboBoxModel(
								new String[] {"A.M.", "P.M."});
				cmbAntePost = new JComboBox();
				getContentPane().add(cmbAntePost);
				cmbAntePost.setModel(cmbAntePostModel);
				cmbAntePost.setBounds(265, 240, 51, 21);
			}
			pack();
			this.setSize(492, 409);
			this.setTitle("Efectuar Reserva");
			//MEDIDAS Y CENTRALIZACION DE LA PANTALLA.
	        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
	        int w = this.getSize().width;
	        int h = this.getSize().height;
	        int x = (dim.width-w)/2;
	        int y = (dim.height-h)/2;
	        this.setLocation(x, y);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

}
